<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<include file="Public/header" />
</head>
<body>
<script type="text/javascript">
	var personnelEditUrl="{:U('Depot/personnelSave')}";//更新数据
	var getpersonnelUrl="{:U('Depot/get_personnel')}";
	var personnelDelUrl="{:U('Depot/personnelDel')}";
	var personnelExamineUrl="{:U('Depot/examinepersonnel')}";
	var personnelClearUrl="{:U('Depot/personnelClear')}";
	var personnelUndoUrl="{:U('Depot/personnelUndo')}";
	var personnelInfoUrl="{:U('Depot/personnelInfo')}";
	var erpId="{:I('id')}";//erp企业对应id
	
	<!-- using('../../../default/js/personnel.js'); -->
</script>
<script type="text/javascript" src="__PUBLIC__/default/js/personnel.js"></script>

	<table id="personnelDatagrid" toolbar="#personnel_tb"></table>
	<!-- 添加 -->
	<div id="personnelAddDialog" class="easyui-dialog" title="规则添加" style="width:500px;padding:10px 20px"
        closed="true" buttons="#personnelAddButtons"  modal="true">
         <form id="personnelAddForm" method="post" novalidate>
			<div class="fitem">
                <label>员工编号</label>
                <input name="no" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
            <div class="fitem">
                <label>员工姓名</label>
                <input name="name" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>所在部门</label>
                <select class="easyui-combobox" name="section_no" id="personnel_sectionNo" style="width:70px;height:30px;" data-options="required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                    <volist name="sectionlist" id="vo">
                        <option value="{$vo['no']}">{$vo['name']}</option>
                    </volist>
                </select>   
            </div>
         </form>
    </div>
    <div id="personnelAddButtons">
    	<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="personnelObj.add('{:U('Depot/personnelAdd')}')" style="width:90px">添加</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#personnelAddDialog').dialog('close')" style="width:90px">取消</a>
    </div>
    <!-- /添加 -->
	<!-- 编辑 -->
    <div id="personnelEditDialog" class="easyui-dialog" style="width:400px;padding:10px 20px"
            closed="true" buttons="#personnelEditButtons"  modal="true">
        <form id="personnelEditForm" method="post" novalidate>          
            <div class="fitem">
                <label>员工编号</label>
				 <input name="id"  type="hidden" />
                <input name="no" class="easyui-textbox" data-options="required:true,disabled:true,delay:1000,height:30" />
            </div>
            <div class="fitem">
                <label>员工姓名</label>
                <input name="name" id="name" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>所在部门</label>
                <select class="easyui-combobox" name="section_no" id="personnel_sectionNo" style="width:70px;height:30px;" data-options="required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                    <volist name="sectionlist" id="vo">
                        <option value="{$vo['no']}">{$vo['name']}</option>
                    </volist>
                </select>   
            </div>
        </form>
    </div>
    <div id="personnelEditButtons">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="personnelObj.save('{:U('Depot/personnelSave')}')" style="width:90px">更新</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:
    $('#personnelEditDialog').dialog('close')" style="width:90px">取消</a>
    </div>
    <!-- /编辑 -->
    <!-- 搜索栏 -->
    <div id="personnel_tb">
        <form id="personnelSearchForm" method="post" novalidate>
             <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon icon-all" plain="true" onclick="personnelObj.showAll()">全部</a>     
			 员工编号:<input class="easyui-textbox" name="no" style="width:150px;height:30px;"> 
			 员工姓名:<input class="easyui-textbox" name="name" style="width:150px;height:30px;">
			<a href="#" class="easyui-linkbutton searchBar" iconCls="icon-search" style="height:30px;">搜索</a>
        </form>
		<a href="javascript:void(0)" onclick="personnelObj.addBar()" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">添加</a>
        <a href="javascript:void(0)" onclick="personnelObj.editBar()" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">修改</a>
        <a href="javascript:void(0)" onclick="personnelObj.removeBar()" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true">删除</a>
		<a href="javascript:void(0)" onclick="personnelObj.reloadBar()" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true">刷新</a>
		<a href="javascript:void(0)" onclick="personnelObj.saveBar()" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true">保存</a>
        <a href="javascript:void(0)" onclick="personnelObj.examineBar(1)" class="easyui-linkbutton" data-options="iconCls:'icon-key',plain:true">审核通过</a>
		<a href="javascript:void(0)" onclick="personnelObj.examineBar(2)" class="easyui-linkbutton" data-options="iconCls:'icon-key_delete',plain:true">审核不通过</a>
		<a href="javascript:void(0)" class="easyui-menubutton" data-options="menu:'#personnel_mm1',iconCls:'icon-recycle'">回收站</a>
		<div id="personnel_mm1" style="width:150px;">
			<div onclick="personnelObj.recycle()">查看</div>
			<div onclick="personnelObj.undoBar()" data-options="iconCls:'icon-undo'">恢复</div>
			<div onclick="personnelObj.clearBar()" data-options="iconCls:'icon-remove'">删除</div>
		</div>
    </div>
    <!-- /搜索栏 -->
</body>